$OpenBSD: patch-libgphoto2_port_gphoto2_gphoto2-port-portability_h,v 1.7 2016/03/24 09:48:17 ajacoutot Exp $

libusb1/libusb1.c:304: warning: implicit declaration of function 'snprintf'
libusb1/libusb1.c:304: warning: incompatible implicit declaration of built-in function 'snprintf'

--- libgphoto2_port/gphoto2/gphoto2-port-portability.h.orig	Mon Jan 25 20:29:59 2016
+++ libgphoto2_port/gphoto2/gphoto2-port-portability.h	Thu Mar 24 10:04:47 2016
@@ -181,6 +181,7 @@ typedef struct {
 /* yummy. :) */
 
 /* XOPEN needed for usleep */
+#ifndef __OpenBSD__
 #ifndef _XOPEN_SOURCE
 # define _XOPEN_SOURCE 500
 #else
@@ -189,11 +190,14 @@ typedef struct {
 #  define _XOPEN_SOURCE 500
 # endif
 #endif
+#endif
 
 /* for nanosleep */
+#ifndef __OpenBSD__
 # ifndef _POSIX_C_SOURCE
 #  define _POSIX_C_SOURCE 199309
 # endif
+#endif
 # include <time.h>
 
 # include <strings.h>
